﻿#ifndef CHATWIDGET_H
#define CHATWIDGET_H

#include <QSplitter>

namespace Ui {
class ChatWidget;
}

class ChatListViewer;
class EmotionWidget;
class QListWidgetItem;
class QPlainTextEdit;

class ChatWidget : public QSplitter
{
    Q_OBJECT

public:
    explicit ChatWidget(QWidget *parent = Q_NULLPTR);
    ~ChatWidget();
    bool eventFilter(QObject * watched, QEvent * event);

    QString getContent() const;

    ChatListViewer* getTextShow();
    QPlainTextEdit* getTextInput();
signals:
    void sendClicked();
    void sendImage(const QPixmap &pixmap);
private slots:
    void emotionClicked(QListWidgetItem *item);
    void screenCaptured(QPixmap pixmap);

    void on_tool_emotion_clicked();

    void on_tool_picture_clicked();

    void on_tool_capture_clicked();

private:
    void handleSendImage(const QPixmap &pixmap);
    Ui::ChatWidget *ui;
    EmotionWidget* emotionWidget;
};

#endif // CHATWIDGET_H
